//
//  NSString+Validate.h
//  CategoryKit
//
//  Created by Horace on 16/12/6.
//  Copyright © 2016年 AiWays. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Validate)

/**
 *  Determines if string is not contains only whitespace and newlines
 */
- (BOOL)isNotEmpty;

/**
 *  trim whitespaces and newlines
 */
- (NSString *)trimWhiteCharacters;

/**
 * Determines if the string contains only whitespace and newlines.
 */
- (BOOL)isWhitespaceAndNewlines;

/**
 * Determines if the string is empty or contains only whitespace.
 */
- (BOOL)isEmptyOrWhitespace;

/*
 * Checks to see if the string contains the given string, case insenstive
 */
- (BOOL)containsString:(NSString *)string;

/*
 * Checks to see if the string contains the given string while allowing you to define the compare options
 */
- (BOOL)containsString:(NSString *)string options:(NSStringCompareOptions)options;

/**
 校验字符串是否为手机号码

 @return BOOL
 */
- (BOOL)isMobileNumber;

/**
 校验身份证信息

 @return BOOL
 */
- (BOOL)isIDCardNumber;

/**
 校验是否是企业名称
 
 @return BOOL
 */
- (BOOL)isCompanyName;

/**
 校验是否是企业编号
 
 @return BOOL
 */
- (BOOL)isCompanyCode;

/**
 是否包含汉字
 
 */
- (BOOL)isContainsChinese;

/**
 是否全部是汉字
 
 */
- (BOOL)isAllChinaChinese;

/**
 是否包含数字
 
 */
- (BOOL)isContainsNumber;

/**
 是否包含英文字符
 
 */
- (BOOL)isContainsEnglishCharacter;

/**
 校验是否可以拨电话

 @return BOOL
 */
- (BOOL)canTel;

/**
 校验是否为金额，保留小数点后两位

 @return BOOL
 */
- (BOOL)validateMoney;

/**
 校验是否有emoji

 @return BOOL
 */
- (BOOL)stringContainsEmoji;


/// 返回所有的电话包括固话的位置
- (NSArray <NSValue *>*)phoneRanges;

@end
